<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.12"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Nabu-asr: nabu.neuralnetworks.evaluators.evaluator.Evaluator Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Nabu-asr
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.12 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="namespacenabu.html">nabu</a></li><li class="navelem"><b>neuralnetworks</b></li><li class="navelem"><b>evaluators</b></li><li class="navelem"><b>evaluator</b></li><li class="navelem"><a class="el" href="classnabu_1_1neuralnetworks_1_1evaluators_1_1evaluator_1_1Evaluator.html">Evaluator</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-attribs">Public Attributes</a> &#124;
<a href="classnabu_1_1neuralnetworks_1_1evaluators_1_1evaluator_1_1Evaluator-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">nabu.neuralnetworks.evaluators.evaluator.Evaluator Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>the general evaluator class  
 <a href="classnabu_1_1neuralnetworks_1_1evaluators_1_1evaluator_1_1Evaluator.html#details">More...</a></p>
<div class="dynheader">
Inheritance diagram for nabu.neuralnetworks.evaluators.evaluator.Evaluator:</div>
<div class="dyncontent">
 <div class="center">
  <img src="classnabu_1_1neuralnetworks_1_1evaluators_1_1evaluator_1_1Evaluator.png" usemap="#nabu.neuralnetworks.evaluators.evaluator.Evaluator_map" alt=""/>
  <map id="nabu.neuralnetworks.evaluators.evaluator.Evaluator_map" name="nabu.neuralnetworks.evaluators.evaluator.Evaluator_map">
<area href="classnabu_1_1neuralnetworks_1_1evaluators_1_1decoder__evaluator_1_1DecoderEvaluator.html" title="The Decoder Evaluator is used to evaluate a decode. " alt="nabu.neuralnetworks.evaluators.decoder_evaluator.DecoderEvaluator" shape="rect" coords="0,112,411,136"/>
<area href="classnabu_1_1neuralnetworks_1_1evaluators_1_1loss__evaluator_1_1LossEvaluator.html" title="The Decoder Evaluator is used to evaluate a decode. " alt="nabu.neuralnetworks.evaluators.loss_evaluator.LossEvaluator" shape="rect" coords="421,112,832,136"/>
</map>
 </div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:ada1890ac2ea5bbbbdb46059c195eddb5"><td class="memItemLeft" align="right" valign="top">def&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnabu_1_1neuralnetworks_1_1evaluators_1_1evaluator_1_1Evaluator.html#ada1890ac2ea5bbbbdb46059c195eddb5">__init__</a> (self, conf, dataconf, model)</td></tr>
<tr class="memdesc:ada1890ac2ea5bbbbdb46059c195eddb5"><td class="mdescLeft">&#160;</td><td class="mdescRight"><a class="el" href="classnabu_1_1neuralnetworks_1_1evaluators_1_1evaluator_1_1Evaluator.html" title="the general evaluator class ">Evaluator</a> constructor.  <a href="#ada1890ac2ea5bbbbdb46059c195eddb5">More...</a><br /></td></tr>
<tr class="separator:ada1890ac2ea5bbbbdb46059c195eddb5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afc148404b762bc8fbfcfdc60dfb0dc99"><td class="memItemLeft" align="right" valign="top">def&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnabu_1_1neuralnetworks_1_1evaluators_1_1evaluator_1_1Evaluator.html#afc148404b762bc8fbfcfdc60dfb0dc99">evaluate</a> (self)</td></tr>
<tr class="memdesc:afc148404b762bc8fbfcfdc60dfb0dc99"><td class="mdescLeft">&#160;</td><td class="mdescRight">evaluate the performance of the model  <a href="#afc148404b762bc8fbfcfdc60dfb0dc99">More...</a><br /></td></tr>
<tr class="separator:afc148404b762bc8fbfcfdc60dfb0dc99"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac131dc34e2f3e807fa9f03a6caaa77f7"><td class="memItemLeft" align="right" valign="top">def&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnabu_1_1neuralnetworks_1_1evaluators_1_1evaluator_1_1Evaluator.html#ac131dc34e2f3e807fa9f03a6caaa77f7">update_loss</a> (self, loss, inputs, input_seq_length, targets, target_seq_length)</td></tr>
<tr class="memdesc:ac131dc34e2f3e807fa9f03a6caaa77f7"><td class="mdescLeft">&#160;</td><td class="mdescRight">update the validation loss for a batch of data  <a href="#ac131dc34e2f3e807fa9f03a6caaa77f7">More...</a><br /></td></tr>
<tr class="separator:ac131dc34e2f3e807fa9f03a6caaa77f7"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
Public Attributes</h2></td></tr>
<tr class="memitem:ab4f65ef74d5cc230a243dccade27b4d0"><td class="memItemLeft" align="right" valign="top"><a id="ab4f65ef74d5cc230a243dccade27b4d0"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>conf</b></td></tr>
<tr class="separator:ab4f65ef74d5cc230a243dccade27b4d0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2a5e2b271c4057b66fc3e2e6f379fb3f"><td class="memItemLeft" align="right" valign="top"><a id="a2a5e2b271c4057b66fc3e2e6f379fb3f"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>model</b></td></tr>
<tr class="separator:a2a5e2b271c4057b66fc3e2e6f379fb3f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae7fe89a98a6d8800ecd0193df0be588f"><td class="memItemLeft" align="right" valign="top"><a id="ae7fe89a98a6d8800ecd0193df0be588f"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>input_dataconfs</b></td></tr>
<tr class="separator:ae7fe89a98a6d8800ecd0193df0be588f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1d9cb73dbb6064c5c498debd9a3d94d1"><td class="memItemLeft" align="right" valign="top"><a id="a1d9cb73dbb6064c5c498debd9a3d94d1"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>target_dataconfs</b></td></tr>
<tr class="separator:a1d9cb73dbb6064c5c498debd9a3d94d1"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>the general evaluator class </p>
<p>an evaluator is used to evaluate the performance of a model </p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="ada1890ac2ea5bbbbdb46059c195eddb5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ada1890ac2ea5bbbbdb46059c195eddb5">&sect;&nbsp;</a></span>__init__()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">def nabu.neuralnetworks.evaluators.evaluator.Evaluator.__init__ </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>self</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>conf</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>dataconf</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>model</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p><a class="el" href="classnabu_1_1neuralnetworks_1_1evaluators_1_1evaluator_1_1Evaluator.html" title="the general evaluator class ">Evaluator</a> constructor. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">conf</td><td>the evaluator configuration as a ConfigParser </td></tr>
    <tr><td class="paramname">dataconf</td><td>the database configuration </td></tr>
    <tr><td class="paramname">model</td><td>the model to be evaluated </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="afc148404b762bc8fbfcfdc60dfb0dc99"></a>
<h2 class="memtitle"><span class="permalink"><a href="#afc148404b762bc8fbfcfdc60dfb0dc99">&sect;&nbsp;</a></span>evaluate()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">def nabu.neuralnetworks.evaluators.evaluator.Evaluator.evaluate </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>self</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>evaluate the performance of the model </p>
<dl class="section return"><dt>Returns</dt><dd><ul>
<li>the loss as a scalar tensor</li>
<li>an operation to update the loss</li>
<li>the number of batches in the validation set as an integer </li>
</ul>
</dd></dl>

</div>
</div>
<a id="ac131dc34e2f3e807fa9f03a6caaa77f7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac131dc34e2f3e807fa9f03a6caaa77f7">&sect;&nbsp;</a></span>update_loss()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">def nabu.neuralnetworks.evaluators.evaluator.Evaluator.update_loss </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>self</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>loss</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>inputs</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>input_seq_length</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>targets</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>target_seq_length</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>update the validation loss for a batch of data </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">loss</td><td>the current loss </td></tr>
    <tr><td class="paramname">inputs</td><td>the inputs to the neural network, this is a list of [batch_size x ...] tensors </td></tr>
    <tr><td class="paramname">input_seq_length</td><td>The sequence lengths of the input utterances, this is a list of [batch_size] vectors </td></tr>
    <tr><td class="paramname">targets</td><td>the targets to the neural network, this is a list of [batch_size x max_output_length] tensors. </td></tr>
    <tr><td class="paramname">target_seq_length</td><td>The sequence lengths of the target utterances, this is a list of [batch_size] vectors</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>an operation to update the loss </dd></dl>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="evaluator_8py.html">evaluator.py</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.12
</small></address>
</body>
</html>
